# Recipe created by recipetool
# This is the basis of a recipe and may need further editing in order to be fully functional.
# (Feel free to remove these comments when editing.)
#
# WARNING: the following LICENSE and LIC_FILES_CHKSUM values are best guesses - it is
# your responsibility to verify that the values are complete and correct.
#
# NOTE: multiple licenses have been detected; if that is correct you should separate
# these in the LICENSE value using & if the multiple licenses all apply, or | if there
# is a choice between the multiple licenses. If in doubt, check the accompanying
# documentation to determine which situation is applicable.
LICENSE = "GPLv2 & LGPLv2.1 & LGPLv3 & GPLv3"
LIC_FILES_CHKSUM = "file://Copyright;md5=8a40ab566787dc1fc9e9ed35e2727d94 \
                    file://LICENSE;md5=91f1cb870c1cc2d31351a4d2595441cb \
                    file://ffmpeg/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
                    file://ffmpeg/COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
                    file://ffmpeg/COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
                    file://ffmpeg/LICENSE.md;md5=acda96fe91ccaabc9cd9d541806a0d37 \
                    file://ffmpeg/COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
                    file://debian/copyright;md5=e07760891dfcfffe279e784ee7dceac8"

SRC_URI = "git://192.168.1.102/gaozhenyan/zero_mplayer.git;protocol=http"

# Modify these as desired
PV = "1.3.0+git${SRCPV}"
SRCREV = "${AUTOREV}"

S = "${WORKDIR}/git"

DEPENDS = "libvdpau speex mesa-gl alsa-lib ncurses libxxf86dga"
DEPENDS +="libjpeg-turbo libtheora bzip2 libogg libxinerama libxv gnutls"
DEPENDS += "libpng tremor libsdl zlib libxxf86vm libx11"

RDEPENDS_${PN} = "libvdpau speex mesa-gl alsa-lib ncurses libxxf86dga"
RDEPENDS_${PN} +="libjpeg-turbo libtheora bzip2 libogg libxinerama libxv gnutls"
RDEPENDS_${PN} += "libpng tremor libsdl zlib libxxf86vm libx11"
RDEPENDS_${PN} += "sunxi-mali"

#inherit pkgconfig autotools

do_configure () {
        ${S}/configure --disable-mencoder --disable-vcd --disable-bluray \
        --disable-dvdnav --disable-dvdread --disable-cdparanoia --disable-cddb \
        --disable-vidix --disable-tv --disable-pulse \
        --enable-cross-compile --target=arm-linux \
        --disable-dvb --disable-ftp \
        --disable-real --disable-xanim \
        --enable-sdl \
        --enable-vdpau \
        --prefix=/usr \
        --extra-cflags="-D_GNU_SOURCE -I /home/gaozy/work/orangepione/orangepione_build_system/build/tmp/sysroots/orangepione/usr/include" \
        --extra-ldflags="-L /home/gaozy/work/orangepione/orangepione_build_system/build/tmp/sysroots/orangepione/usr/lib"
}

do_compile() {
    oe_runmake
}

do_install () {
    make install INSTALLSTRIP=""  DESTDIR=${D}
    rm -rf ${D}/usr/lib
    rm -rf ${D}/usr/share
    rm -rf ${D}/usr/etc
}
